//
//  JWHomePageHead.m
//  koubei
//
//  Created by 李彦宏 on 2018/5/14.
//  Copyright © 2018年 朱圳. All rights reserved.
//

#import "JWHomePageHead.h"

@implementation JWHomePageHead

- (instancetype)initWithFrame:(CGRect)frame{
    if(self=[super initWithFrame:frame]){
        [self setUI];
    }
    return self;
}

- (void)setUI{
#pragma -mark ————————————搜索UI————————————————————
    UIView *blckV=[[UIView alloc]initWithFrame:CGRectMake(0, 0, Screen_width, 30)];
    blckV.backgroundColor=[UIColor blackColor];
    [self addSubview:blckV];
    
    UILabel *lbT=[[UILabel alloc]init];
    lbT.text=@"*所有未分配的学生";
    lbT.textAlignment=NSTextAlignmentCenter;
    lbT.textColor=dominantColor;
    lbT.font=[UIFont systemFontOfSize:14.5];
    lbT.frame=CGRectMake(5, 2, Screen_width/2-20, 26);
    [self addSubview:lbT];
    
    UIButton *lbtn = [[UIButton alloc]init];
    [lbtn setFrame:CGRectMake(Screen_width/2, 3, Screen_width/2-10, 24)];
    lbtn.backgroundColor=[UIColor whiteColor];
    lbtn.layer.cornerRadius=5;
    [lbtn setTitle:@"学员姓名" forState:UIControlStateNormal];
    UIImage *image=[UIImage imageNamed:@"searchbar_textfield_search_icon"];
    [lbtn setImage:image forState:UIControlStateNormal];
    [lbtn setTitleEdgeInsets:UIEdgeInsetsMake(0,-75, 0,image.size.width)];
    [lbtn setImageEdgeInsets:UIEdgeInsetsMake(0, 100, 0, 0)];
    self.StSearchBtn=lbtn;
    [lbtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
    
    [blckV addSubview:lbtn];
#pragma -mark ———————————研究生头UI————————————————————
    UILabel *lb2=[[UILabel alloc] init];
    [lb2 setBackgroundColor:[UIColor clearColor]];
    [lb2 setTextColor:[UIColor blackColor]];
    [lb2 setFont:[UIFont systemFontOfSize:15]];
    lb2.textAlignment=NSTextAlignmentCenter;
    lb2.text=@"教务";
    [self  addSubview:lb2];
    lb2.frame = CGRectMake(ScreenWidth-90, 37, 75, 30);
    
    UILabel *lb3=[[UILabel alloc] init];
    [lb3 setBackgroundColor:[UIColor clearColor]];
    [lb3 setTextColor:[UIColor blackColor]];
    [lb3 setFont:[UIFont systemFontOfSize:15]];
    lb3.textAlignment=NSTextAlignmentCenter;
    lb3.text=@"院校及专业";
    [self addSubview:lb3];
    lb3.frame = CGRectMake(15, 37, ScreenWidth-105, 30);
    //下划线
    UILabel *Xlb=[[UILabel alloc]init];
    Xlb.backgroundColor=[UIColor lightGrayColor];
    Xlb.text=@" ";
    [self addSubview:Xlb];
    Xlb.frame=CGRectMake(0, 69, ScreenWidth, 1);
}
@end
